<!DOCTYPE html>
<html>
<head>
  <meta content="IE=11.0000" http-equiv="X-Ua-Compatible">
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-Ua-Compatible" content="IE=edge,chrome=1">

  <title>开工前材料上报</title>
  <!--region 引入公用js和css -->
  <link href="../assets/plugins/animate/animate.css" rel="stylesheet">
  <link href="../assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/base/css/components.css" rel="stylesheet" id="style_components" type="text/css"/>
  <link href="../assets/base/css/plugins.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/ditop/layout.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/datatables/datatables.min.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/datatables/plugins/bootstrap/datatables.bootstrap.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/bootstrap-table/bootstrap-table.css" rel="stylesheet">
  <link href="../assets/plugins/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.css" rel="stylesheet">
  <link href="../assets/plugins/bootstrap-toastr/toastr.css" rel="stylesheet">
  <link rel="stylesheet" href="../assets/plugins/sweetalert/sweetalert.css">
  <link rel="stylesheet" href="../assets/plugins/layer/theme/default/layer.css">
  <link href="../assets/plugins/select2/css/select2.min.css" rel="stylesheet">
  <link href="../assets/plugins/icheck/skins/flat/aero.css" rel="stylesheet">
  <link href="../assets/ditop/ditop.css" rel="stylesheet">
  <link href="../assets/ditop/style/ztree/style9/treestyle.css" rel="stylesheet">
  <link href="../assets/plugins/bootstrap-touchspin/bootstrap.touchspin.css" rel="stylesheet">

  <link href="../assets/plugins/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css"/>
  <link href="../assets/plugins/bootstrap-daterangepicker-extend/daterangepicker-ext.css" rel="stylesheet" type="text/css"/>

  <script src="../assets/plugins/jquery/jquery.min.js"></script>
  <script src="../assets/plugins/bootstrap/js/bootstrap.min.js"></script>
  <script src="../assets/plugins/bootstrap-toastr/toastr.js"></script>
  <script src="../assets/plugins/art-template/template.js"></script>
  <script src="../assets/plugins/layer/layer.js"></script>
  <script src="../assets/ditop/ditop.js"></script>
  <link href="../assets/module/gcjsy/css/public.css" rel="stylesheet"> <!-- CSS Customization -->
  <link href="../assets/module/gcjsy/css/pagination.css" rel="stylesheet">
  <!--endregion-->

 
  <link rel="stylesheet" href="market.css">
  <style>
    .query-title{
      width: 65px;
      text-align: right;
    }
  </style>
</head>

<body class="min1280">
<div class="page-wrapper">

  <div class="page-header navbar">
    <div class="page-header-inner clearfix">
      <div class="logo pull-left">
        <a href="#"><img src="../assets/images/logo/logo.png" alt="logo" class="logo-default"> </a>
      </div>
      <div class="main-menu pull-left">
        <ul class="nav navbar-nav">
          <li id="home">
            <span>首页</span>
          </li>
          <li class="active-menu">
            <div class="header-type">
              <span>项目库</span>
            </div>
          </li>
          <li>
            <div class="header-type">
              <span>政务大厅</span>
            </div>
          </li>
          <li>
            <div class="header-type">
              <span>更多服务</span>
            </div>
          </li>
        </ul>
      </div>
      <div class="top-menu pull-right">
        <ul class="nav navbar-nav">
          <li><a href="#"><i class="dtFont dtFont-msg"></i><span class="badge badge-danger"> 9 </span></a>
          </li>
          <li><a href="#"><i class="dtFont dtFont-naozhong"></i><span class="badge badge-info"> 1 </span></a></li>
          <li><a href="#"><i class="dtFont dtFont-gonggao"></i><span class="badge badge-info"></span></a></li>
          <li><a href="#"><i class="dtFont dtFont-help"></i></a></li>


          <li class="dropdown">
            <a href="#" class="dropdown-toggle user-info" data-toggle="dropdown" data-hover="dropdown"
               data-close-others="true"><i class="dtFont dtFont-my_icon"></i></a>
            <ul class="dropdown-menu dropdown-menu-default pull-right	">
              <li class="profile">
                <a href="javascript:;"> <i class="icon-user"></i> 个人中心</a>
              </li>
              <li class="changePassword">
                <a href="javascript:;"> <i class="icon-key"></i> 修改密码</a>
              </li>
              <li class="feedBack">
                <a href="javascript:;"> <i class="icon-bubbles"></i> 给管理员留言</a>
              </li>
              <li class="divider"></li>
              <li class="logout">
                <a href="javascript:;"> <i class="icon-close"></i>退出</a>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </div>
  <div class="page-container clearfix">
    <!--左侧边栏-->
    <div class="page-sidebar-wrapper pull-left">
      <div class="pageIcon">
        <img src="../assets/module/gcjsy/images/edit.png" alt="">
        <p class="fmAx16">开工前材料上报</p>
      </div>
      <div class="page-sidebar navbar-collapse collapse">
        <div class="left-menu2">
          <ul class="anchor-list padding-left-10">
            <li><i class="green"></i><a href="javascript:;">见索即付农民工工资支付保函</a></li>
            <li><i class="gray"></i><a href="javascript:;">工资性工程款拨付凭证</a></li>
            <li><i class="gray"></i><a href="javascript:;">农民工维权工作组设置</a></li>
          </ul>
        </div>
      </div>
    </div>

    <div class="page-content-wrapper pull-right">


      <div class="page-content padding-bottom-65">
        <!--头部面包屑-->
        <div class="headTitle clearfix margin-bottom-5">
          <ul class="page-crumbs pull-left">
            <li>您的位置：</li>
            <li><a href="#w1">建设工程施工许可核发</a></li>
            <li><a href="#w2">新申请</a></li>
          </ul>
          <a class="pull-right" href="javascript:;">返回上一级</a>
        </div>

        <!--主体内容-->
        <div class="page-radius">
          <div class="report-tips flex-h margin-bottom-20">
            <span></span>
            <div class="report-tips-text flex1">
              <h3>合肥斯泰克新材料科技有限公司数字电视接收机电源项目6#加工厂房</h3>
              <div class="flex-h">
                <p><span>项目编码：</span>3601022112100201</p>
                <p><span>合同价：</span>78454万元</p>
              </div>
            </div>
          </div>
          <form action="">
            <section class="margin-bottom-30" id="#w1">
              <h3 class="title2">见索即付农民工工资支付保函 <span class="t-tag orange"><i class="dtFont dtFont-gantanhao-copy"></i>除施工总包范围外的保障金保函</span></h3>
              <div class="input-form">
                <div class="query-item">
                  <b class="query-title"><font class="red">*</font>保函编号</b>
                  <div class="query-right">
                    <input class="form-control" style="width: 414px" type="text" placeholder="">
                    <span class="help-block"></span>
                  </div>
                </div>
                <div class="query-item">
                  <b class="query-title"><font class="red">*</font>开户银行</b>
                  <div class="query-right">
                    <input class="form-control" style="width: 414px" type="text" placeholder="">
                    <span class="help-block"></span>
                  </div>
                </div>
                <div class="query-item">
                  <b class="query-title"><font class="red">*</font>开立日期</b>
                  <div class="query-right relative">
                    <i class="fa fa-calendar-o"></i>
                    <input type="text" style="width: 228px;" class="form-control active" placeholder="">
                    <span class="help-block"></span>
                  </div>
                </div>
                <div class="query-item">
                  <b class="query-title"><font class="red">*</font>截止日期</b>
                  <div class="query-right relative">
                    <i class="fa fa-calendar-o"></i>
                    <input type="text" style="width: 228px;" class="form-control active" placeholder="">
                    <span class="help-block"></span>
                  </div>
                </div>
                <div class="query-item">
                  <b class="query-title"><font class="red">*</font>担保金额</b>
                  <div class="query-right" style="width: 230px;">
                    <div class="input-group">
                      <input type="text" class="form-control" placeholder="">
                      <span class="input-group-addon">万元</span>
                      <span class="help-block"></span>
                    </div>
                  </div>
                </div>
                <div class="query-item">
                  <b class="query-title"><font class="red">*</font>担保人</b>
                  <div class="query-right">
                    <input class="form-control" style="width: 228px" type="text" placeholder="">
                    <span class="help-block"></span>
                  </div>
                </div>
                <div class="query-item">
                  <b class="query-title"><font class="red">*</font>受益人</b>
                  <div class="query-right">
                    <input class="form-control" style="width: 228px" type="text" placeholder="">
                    <span class="help-block"></span>
                  </div>
                </div>
              </div>
            </section>
            <section class="margin-bottom-30" id="#w2">
              <h3 class="title2">
                <span>资性工程款拨付凭证</span>
                <span class="pull-right" style="transform: translateY(-8px)">
                  <a id="addPay" class="basicsBtn blue" href="javascript:;">添加凭证</a>
                </span>
              </h3>
              <div class="currencyTab">
                <table class="table table-bordered">
                  <thead>
                  <tr>
                    <th width="60" class="text-center">序号</th>
                    <th width="27%">付款单位</th>
                    <th width="25%">收款单位</th>
                    <th width="12%">支付金额(万元)</th>
                    <th width="10%">支付日期</th>
                    <th width="10%">上报月度</th>
                    <th width="80" class="text-center">操作</th>
                  </tr>
                  </thead>
                  <tbody id="payTbody">
                  <tr>
                    <td class="text-center">1</td>
                    <td>合肥海恒投资控股集团公司</td>
                    <td>安徽德拓信息科技有限公司</td>
                    <td>30.23</td>
                    <td>2021-12-05 </td>
                    <td>2021-10</td>
                    <td class="text-center">
                      <a onclick="payEdit(this)" class="blue" href="javascript:;">编辑</a>
                      <a onclick="payDelete(this)" class="blue" href="javascript:;">移除</a>
                    </td>
                  </tr>
                  <!--<tr>
                    <td class="no-base-data" colspan="5" style="height: 320px;"><p>暂无数据</p></td>
                  </tr>-->
                  </tbody>
                </table>
              </div>
            </section>
            <section class="margin-bottom-30"  id="#w3">
              <h3 class="title2">
                <span>农民工维权工作组设置</span>
                <span class="pull-right" style="transform: translateY(-8px)">
                  <a id="addSetUp" class="basicsBtn blue" href="javascript:;">添加</a>
                </span>
              </h3>
              <div class="currencyTab">
                <table class="table table-bordered">
                  <thead>
                    <tr>
                      <th width="60" class="text-center">序号</th>
                      <th width="27%">职务</th>
                      <th width="27%">姓名</th>
                      <th width="30%">联系方式</th>
                      <th width="80" class="text-center">操作</th>
                    </tr>
                  </thead>
                  <tbody id="tbody">
                    <tr>
                      <td class="text-center">1</td>
                      <td><input name="title" type="text" class="form-control"></td>
                      <td><input name="name" type="text" class="form-control"></td>
                      <td><input name="phone" type="text" class="form-control"></td>
                      <td class="text-center">
                        <a onclick="setDelete(this)" class="blue" href="javascript:;">移除</a>
                      </td>
                    </tr>
                    <!--<tr>
                      <td class="no-base-data" colspan="5" style="height: 320px;"><p>暂无数据</p></td>
                    </tr>-->
                  </tbody>
                </table>
              </div>
            </section>
            <section class="margin-bottom-30">
              <h3 class="title2">相关附件</h3>
              <!--此处放附件-->
            </section>
          </form>
        </div>
      </div>
      <div class="referTo">
        <button class="basicsBtn grayLine" href="javascript:;">保存草稿</button>
        <button class="basicsBtn blue" href="javascript:;">上报</button>
      </div>


    </div>


  </div>
</div>

<!--region 引入公用js和css -->
<script src="../assets/plugins/sweetalert/sweetalert.min.js"></script>
<script src="../assets/plugins/jquery.blockui.min.js"></script>
<script src="../assets/plugins/js.cookie.min.js"></script>
<script src="../assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="../assets/plugins/jquery.blockui.min.js"></script>
<script src="../assets/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<script src="../assets/plugins/bootstrap-touchspin/bootstrap.touchspin.js"></script>
<script src="../assets/plugins/moment.min.js"></script>
<script src="../assets/plugins/bootstrap-daterangepicker/daterangepicker.min.js"></script>
<script src="../assets/plugins/counterup/jquery.waypoints.min.js"></script>
<script src="../assets/plugins/counterup/jquery.counterup.min.js"></script>
<script src="../assets/plugins/fullcalendar/fullcalendar.js"></script>
<script src="../assets/plugins/horizontal-timeline/horizontal-timeline.js"></script>
<script src="../assets/plugins/jquery.sparkline.min.js"></script>
<script src="../assets/plugins/select2/js/select2.js"></script>
<script src="../assets/plugins/select2/js/i18n/zh-CN.js"></script>
<script src="../assets/plugins/ztree/jquery.ztree.all.js"></script>
<script src="../assets/plugins/jquery-form/jquery.form.js"></script>
<script src="../assets/plugins/jquery-validator/jquery.placeholder.min.js"></script>
<script src="../assets/plugins/jquery-validator/jquery.validate.js"></script>
<script src="../assets/plugins/jquery-validator/jquery.validate.custom.js"></script>
<script src="../assets/plugins/jquery-validator/localization/messages_zh.js"></script>
<script src="../assets/plugins/jquery-validator/additional-methods.js"></script>
<script src="../assets/plugins/bootstrap-growl/jquery.bootstrap-growl.js"></script>
<script src="../assets/plugins/bootstrap-table/bootstrap-table.js"></script>
<script src="../assets/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
<script src="../assets/plugins/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js"></script>
<script src="../assets/base/scripts/app.js"></script>
<script src="../assets/base/scripts/theme.js"></script>
<script src="../assets/ditop/ditop-addition.js"></script>
<script src="../assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js" type="text/javascript"></script>
<script src="../assets/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"
        type="text/javascript"></script>
<script type="text/javascript" src="../assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"
        charset="UTF-8"></script>
<script type="text/javascript"
        src="../assets/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
        charset="UTF-8"></script>
<script src="../assets/plugins/jquery-validator/jquery.validate.custom.js"></script>
<script src="../assets/ditop/layout.js"></script>
<!--endregion-->

<script>
  // window.payList=[];
  var safeWorkList=[],payList=[];
  $("#addSetUp").on("click",function () {
    safeWorkList=[];
    if($("#tbody tr").length>0){
      $("#tbody tr").each(function () {
        safeWorkList.push({
          title:$(this).find("input[name='title']").val(),
          name:$(this).find("input[name='name']").val(),
          phone:$(this).find("input[name='phone']").val()
        })
      });
    }
    safeWorkList.push({
      title:"",
      name:"",
      phone:""
    });
    safeWorkHtml(safeWorkList)
  });
  
  function safeWorkHtml(data){
    $("#tbody").html(template("safeWorkTpl", {"data": data}))
  }
  
  function setDelete(e){
    var index = $(e).closest("tr").index();
    if($(e).closest("tbody").length>0){
      safeWorkList.splice(index,1);
    }
    safeWorkHtml(safeWorkList)
  }
  
  $("#addPay").on("click",function () {
    payList=[];
    if($("#payTbody tr").length>0){
      $("#payTbody tr").each(function () {
        payList.push({
          paymentUnit:$(this).find("td:nth-child(2)").text(),
          payee:$(this).find("td:nth-child(3)").text(),
          paymentAmount:$(this).find("td:nth-child(4)").text(),
          paymentDate:$(this).find("td:nth-child(5)").text(),
          reportMonthly:$(this).find("td:nth-child(6)").text(),
        })
      });
    }
    Utils.openBox({
      title:"添加凭证",
      scaleWidth:false,
      area:["560px","400px"],
      url:"添加凭证.html",
      subWinCallback: function (data) {
        payList.push(data)
        payHtml(payList)
      }
    })
  });


  
  function payEdit(e) {
    var index = $(e).closest("tr").index();
    window.payItem={
      paymentUnit:$(e).closest("tr").find("td:nth-child(2)").text(),
      payee:$(e).closest("tr").find("td:nth-child(3)").text(),
      paymentAmount:$(e).closest("tr").find("td:nth-child(4)").text(),
      paymentDate:$(e).closest("tr").find("td:nth-child(5)").text(),
      reportMonthly:$(e).closest("tr").find("td:nth-child(6)").text(),
    };
    Utils.openBox({
      title:"添加凭证",
      scaleWidth:false,
      area:["560px","400px"],
      url:"添加凭证.html",
      subWinCallback: function (data) {
        payList[index]=data;
        payHtml(payList);
      }
    })
  }
  function payHtml(data){
    $("#payTbody").html(template("payTpl", {"data": data}))
  }
  
  function payDelete(e) {
    var index = $(e).closest("tr").index();
    if($(e).closest("tbody").length>0){
      payList.splice(index,1);
    }
    payHtml(payList)
  }
</script>
<script type="text/html" id="safeWorkTpl">
  {{if data !=null&&data.length>0}}
  {{each data item index}}
    <tr>
      <td class="text-center">{{index+1}}</td>
      <td><input name="title" type="text" class="form-control" value="{{item.title}}" /></td>
      <td><input name="name" type="text" class="form-control" value="{{item.name}}" /></td>
      <td><input name="phone" type="text" class="form-control" value="{{item.phone}}" /></td>
      <td class="text-center">
        <a onclick="setDelete(this)" class="blue" href="javascript:;">移除</a>
      </td>
    </tr>
  {{/each}}
  {{else}}
    <tr>
      <td class="no-data" colspan="5" style="height: 320px;"><p style="bottom: 20px;">暂无数据</p></td>
    </tr>
  {{/if}}
</script>

<script type="text/html" id="payTpl">
  {{if data !=null&&data.length>0}}
  {{each data item index}}
  <tr>
    <td class="text-center">{{index+1}}</td>
    <td>{{item.paymentUnit}}</td>
    <td>{{item.payee}}</td>
    <td>{{item.paymentAmount}}</td>
    <td>{{item.paymentDate}}</td>
    <td>{{item.reportMonthly}}</td>
    <td class="text-center">
      <a onclick="payEdit(this)" class="blue" href="javascript:;">编辑</a>
      <a onclick="payDelete(this)" class="blue" href="javascript:;">移除</a>
    </td>
  </tr>
  {{/each}}
  {{else}}
  <tr>
    <td class="no-data" colspan="7" style="height: 320px;"><p style="bottom: 20px;">暂无数据</p></td>
  </tr>
  {{/if}}
</script>
</body>
</html>
